package com.yyt.module_main.act;

import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.yyt.libsrc.bean.GetOrderBean;
import com.yyt.libsrc.bean.PrepaidListBean;
import com.yyt.libsrc.conf.Consts;
import com.yyt.libsrc.helper.LocalHelper;
import com.yyt.libsrc.helper.MsgHelper;
import com.yyt.libsrc.net.JavaParamsBuilder;
import com.yyt.libsrc.net.NetUtil;
import com.yyt.libsrc.net.SuccessCallback;
import com.yyt.libsrc.router.RouteTable;
import com.yyt.module_main.R;
import com.yyt.module_main.databinding.ActivityPayorderBinding;
import com.yyt.module_main.databinding.ItemPayorderBinding;
import com.yyt.module_main.fragment.RechargeOrderFragment;
import com.yyt.module_main.fragment.WithdrawOrderFragment;
import com.yyt.module_main.vm.PayorderVM;

import top.lixb.libcommon.base.BaseActivity;
import top.lixb.libcommon.base.ItemHolder;
import top.lixb.libcommon.base.RefreshableActivity;
import top.lixb.libcommon.base.SimpleBindingAdapter;
import top.lixb.libcommon.base.ViewPagerAdapter;

@Route(path = RouteTable.main_payorder)
public class PayorderActivity extends BaseActivity<ActivityPayorderBinding> {

    private PayorderVM mVm;
    private SimpleBindingAdapter<PrepaidListBean.DataBean, ItemPayorderBinding> mAdapter;
    private ViewPagerAdapter mPagerAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_payorder);

        mVm = new PayorderVM();
        mContentBinding.setVm(mVm);
//        if (null != mToolbarDivider) {
//            mToolbarDivider.setVisibility(View.VISIBLE);
//        }
        setTitle("订单管理");

        mPagerAdapter = new ViewPagerAdapter(getSupportFragmentManager());
        mPagerAdapter.addFragment(new RechargeOrderFragment(),"充值订单");
        mPagerAdapter.addFragment(new WithdrawOrderFragment(),"提现订单");
        mContentBinding.vp.setAdapter(mPagerAdapter);
        mContentBinding.tab.setupWithViewPager(mContentBinding.vp);

    }


}
